Processing several images of a camera stream usually includes subtracting consecutive images or frames in order to distinguish between stationary and dynamic or changing parts of the images. Most applications e.g. those related to autonomous vehicles usually require to disregard the stationary parts of the images resulting in faster and more effective processing of the dynamically changing parts.
A method for using image subtraction and dynamic thresholding is disclosed in U.S. Pat. No. 6,061,476. Images are taken before and after the application of a solder paste on printed circuit boards, then the before and after images are subtracted in order to inspect the applied paste. Both the negative and positive subtracted images are processed further by separating the foreground and the background of the subtracted images by dynamic thresholds instead of scalar thresholds. Dynamic thresholds are claimed to enable a more precise detection of the foreground than scalar thresholds. The dynamic thresholding results in a subtracted positive and a subtracted negative image, and then these images are merged and binarized. Edge detection by a Sobel edge detector is performed on the before and after images followed by a true peak detection in order to eliminate false edges. Then the resulting images are binarized by a binarization map. The pixels corresponding to the paste are determined by subtracting the binarized before and after images.
A disadvantage of the above described method is that due to the complex edge detection algorithms, it is not suitable for real-time signal processing.
A method for extracting foreground object image from a video stream is disclosed in US 2011/0164823 A1. The method includes separating the background from the foreground of an image by calculating edges of the frames and a reference background image. The foreground is extracted by subtracting the edges of the frames and the reference background image. The method can also include thresholding to remove noises from the images. The disadvantage of the method is that it requires a reference background image that can be difficult to provide in certain applications. For example, dashboard cameras of autonomous or self-driving cars may not be able to take reference background images required for the method.
In US 2012/0014608 A1 an apparatus and a method for image processing is disclosed. Based on a feature analysis of an image a region-of-interest (ROI) is determined and a mask is created for the ROI. According to this invention, the ROI can be more precisely specified by detecting edges of the images, because the features to be detected by the method have a continuous edge that can be extracted by edge detection algorithms. The ROI masks generated by different methods are synthetized generating a mask for “the region of the most interest”. However, the area covered by the created masks is not limited only to the interesting features, but also includes some of its surroundings as the generated masks have a rectangular shape. Thus, the above described method only ensures that the interesting features of the images are part of the mask, but the mask may include further image parts. This will result higher data storage needs, which is disadvantageous for the real-time evaluation of the images.
In view of the known approaches, there is a need for a method by the help of which a mask covering non-static areas of a camera stream can be generated in a more efficient way than the prior art approaches to enable real-time mask generation for the camera stream.